package com.example.demo2.Service;

import com.example.demo2.biz.Userbiz;
import com.example.demo2.entity.User;
import com.example.demo2.mapper.Usermapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class userimpl implements Userbiz {

    private @Autowired Usermapper usermapper;
    private @Autowired Userbiz userbiz;

    @Override
    public void saveTnStudent(User user) throws Exception {
        usermapper.saveTnStudent(user);
    }

    @Override
    public User getUser(String openID) throws Exception {
        User user =usermapper.getUser(openID);
        return user;
    }

    @Override
    public void updateUser(User user) throws Exception {
        usermapper.updateUser(user);

    }

    @Override
    public List<User> getallUser() {
        return usermapper.getallUser();
    }
}
